package com.yuhs.zixing.pay.web.result;

import java.io.Serializable;

/**
 * @ClassName BaseResult
 * @Description 基础结果类
 * @Author yuhs
 * @CreateDate 2020/12/4
 **/
public class BaseResult implements Serializable {

    /**
     * 业务code
     */
    private String code = "0";

    private String message;

    private Integer count;


    public void buildErrorMessage(String message) {
        this.setMessage(message);
        this.setCode(ResultCodeEnum.FAIL.getCode());
    }

    public void setResult(ResultCodeEnum code, String message) {
        this.setMessage(message);
        this.setCode(code.getCode());
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }
}
